1. Field of the Invention
The present invention relates to an apparatus for controlling a writing operation and a reading operation of a display memory for decoded picture data to be displayed on a monitor and a method thereof.
2. Description of the Related Art
In the MPEG2 system, picture data can be encoded in both a frame structure and a field structure. The encoded picture data is decoded each macroblock, of which is composed of 16.times.16 pixels.
To display decoded picture data in the raster scanning method, a display memory is required so as to hold the decoded picture data until it is displayed. The picture data as a macroblock is read and written from/to the display memory in the following manner.
As shown in FIG. 8, the decoded picture data as one macroblock are arranged in the horizontal direction and successively written to the display memory. Each row of macroblock arranged in the horizontal direction is referred to as slice. Each slice is composed of a sequence of 16 pixels. Hereinafter, a block of slices that are present at the same vertical position is referred to as one slice line.
As shown in FIG. 9A, picture data stored in the display memory is read downwardly line by line and thereby the read picture data is displayed in the raster scanning method. Thus, unless picture data for one slice line has been decoded it cannot be displayed in the raster scanning method. Consequently, as shown in FIG. 9B, the display memory requires a storage capacity for two slice lines. Thus, the display memory has an area 101 for storing a slice line that is read and displayed and an area 102 for storing data of the next slice line.
In addition, an area from which picture data has been read is assigned to a write area for the subsequently decoded picture data. However, as shown in FIG. 10, since decoded picture data is written as one macroblock to the memory, unless picture data for one slice line has been read, the memory area for the slice line can be assigned to a memory area for the subsequently decoded picture data. Thus, as shown in FIG. 9B, the display memory should have a storage capacity for at least two slice lines.